<%@page import="com.sun.java.swing.plaf.windows.resources.windows"%>
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; charset=UTF-8"/>
<title></title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/index-layout.css">

<script type="text/javascript">
$(function() {
	$(".top_orgCode_div,.top_login_code").hover(function() {
		$(this).attr("title",$(this).html());
	});
	valiSesssionUser();
});
function editInfo() {
	addTab('${pageContext.request.contextPath}/sydj/getGljgConMessage.do', '个人信息修改');
}
function goToTjfxHome() {
	window.location.href = "${pageContext.request.contextPath}/tjfxhome.do";
}
function goToJgxtHome() {
	window.location.href = "${pageContext.request.contextPath}/jgxt/index.jsp";
}
function loginOut() {
	if (confirm("确定要退出系统吗？")) {
		window.location.href = "${pageContext.request.contextPath}/loginOut.do";
	}
}
function valiSesssionUser(){
	var t=setTimeout("valiSesssionUser()",6000);
	$.ajax({
		url:"${pageContext.request.contextPath}/admin/valiSessionUser.do",
		type:"post",
		data:{usrId:$("#sessionUserId").val()},
		dataType:"json",
		cache:false,
		success : function(data) {
			if(data.success){
			}else{
				clearTimeout(t);
				alert(data.message);
				window.location.href = "${pageContext.request.contextPath}/index.do";
			}
		}
	});
}
</script>
</head>
<body>
<input type="hidden" id="sessionUserId" name="userId" value="<s:property value="#session['USERID']"/>">
<input type="hidden" id="userType" name="userType" value="<s:property value="#session['USERTYPE']"/>">
<div class="top-class-1">
</div>
<div class="top-class-2">
	
	<div class="top_login_span">
		<span class="top_user_option">欢迎您：</span>
		<span class="top_login_code">
			<s:if test="#session['LINKMAN']==null">
				<s:property value="#session['USERNAME']" />
			</s:if>
			<s:else>
				<s:property value="#session['LINKMAN']" />
			</s:else>
		</span>
		<s:if test="#userType==1">
			<span class="top_user_option">
				<a href="javascript:" onclick="editInfo()">个人信息修改</a>
				<a href="javascript:" onclick="loginOut();return false;">退出</a>
			</span>
		</s:if>
	</div>
</div>
</body>
</html>